﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace L.Basic.Log
{
    /// <summary>
    /// 日志实体对象
    /// </summary>
    public class LogContent
    {
        public string SessionId { get; set; }
        public string UserName { get; set; }
        public string UserId { get; set; }
        public string LoginIp { get; set; }
        public DateTime Date { get; set; }
        public string LogType { get; set; }
        private string _message;

        public string Message
        {
            get { return _message; }
            set
            {
                if (value != null && value.Length > 1000)
                {
                    _message = value.Substring(0, 999);
                }
                else
                    _message = value;
            }
        }

        private string _more;

        public string More
        {
            get { return _more; }
            set
            {
                if (value != null && value.Length > 2000)
                {
                    _more = value.Substring(0, 1999);
                }
                else
                    _more = value;
            }
        }
    }
}
